package com.wenx.v3system.modular.cloud.domain.query;

import com.wenx.base.domain.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统用户查询条件
 * 基于Enhanced RBAC权限模型的用户管理
 * 
 * @author wenx
 * @since 1.0.0
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "系统用户查询条件")
public class SysUserQuery extends BaseQuery<Object> {

    @Schema(description = "用户名（模糊查询）", example = "管理员")
    private String username;

    @Schema(description = "真实姓名（模糊查询）", example = "张三")
    private String realName;

    @Schema(description = "邮箱（模糊查询）", example = "admin@example.com")
    private String email;

    @Schema(description = "手机号（模糊查询）", example = "138")
    private String phone;

    @Schema(description = "用户状态：1-启用，0-禁用，2-锁定", example = "1")
    private Integer status;

    @Schema(description = "性别：1-男，2-女，0-未知", example = "1")
    private Integer gender;

    @Schema(description = "角色ID（查询指定角色的用户）", example = "1")
    private Long roleId;

    @Schema(description = "角色编码（查询指定角色的用户）", example = "ADMIN")
    private String roleCode;

    @Schema(description = "部门ID（查询指定部门的用户）", example = "1")
    private Long departmentId;

    @Schema(description = "关键词（用于账号、用户名、真实姓名的模糊搜索）", example = "管理")
    private String keyword;

    @Schema(description = "最小年龄", example = "18")
    private Integer minAge;

    @Schema(description = "最大年龄", example = "60")
    private Integer maxAge;

    @Schema(description = "排序字段", example = "createTime")
    private String orderBy;

    @Schema(description = "排序方式：asc-升序，desc-降序", example = "desc")
    private String orderType;
}
